<template>
  <view class="contents">
    <view class="list-card-item boxShadow2" @click="handelDetail(data.id)">
      <view class="list-card-content-item list-code">
        <view class="text">产品名称：</view>
        <view>{{ data.name }}</view>
      </view>
      <view class="list-card-content-item list-code">
        <view class="text">产品代码：</view>
        <view>{{ data.code }}</view>
      </view>
      <view class="list-card-content-item list-code">
        <view class="text">所属项目：</view>
        <view class="work_con">{{ data.project }}</view>
      </view>
      <view class="list-card-content-item list-code">
        <view class="text">所属型号：</view>
        <view class="work_con">{{ data.product }}</view>
      </view>
      <view class="list-card-btn">
        <!-- <view class="edit" v-if="!item.isShow && !item.isTimeout">
          <image src="/static/images/edit.png" mode="widthFix" />
          <view>编辑</view>
        </view>-->
        <view class="complete" v-if="data.status==0">
          <!-- <image src="/static/images/sign.png" mode="widthFix"/> -->
          <view>进行中</view>
        </view>
        <view class="complete com_success" v-if="data.status==1">
          <!-- <image src="/static/images/sign_complete.png" mode="widthFix" /> -->
          <view>已完成</view>
        </view>
        <view class="complete com_success" v-if="data.status==2">
          <!-- <image src="/static/images/sign_complete.png" mode="widthFix" /> -->
          <view>已取消</view>
        </view>

        <!-- <view class="complete timeout" v-if=" !item.isShow && item.isTimeout">
          <view>已超时</view>
        </view>-->
      </view>
      <view class="card_item setLevel">
        <view>2021-09-21 09:23:12</view>
      </view>
      <!-- <view class="card_item setLevel">
        <view class="setLevel_btn" >详情</view>
        <image src="../../static/images/next.png"  class="nextImage" />
      </view>-->
    </view>
  </view>
</template>
<script>
export default {
  props: {
    // data: {
    //   type: Array,
    //   defalut: () => {
    //     return []
    //   }
    // }
    data: {
      type: Object,
      default: 0
    }
  },
  data() {
    return {
      remark: ''
    }
  },
  methods: {
    handelDetail() {
      uni.navigateTo({
        url: '/pages/detail/detail'
      })
    },
    // handleComplete(e) {
    //   this.$emit('handleComplete', e)
    // },
    handleClick(e) {
      const that = this
      const { index } = e.currentTarget.dataset
    }
  }
}
</script>
<style lang="scss" scoped>
.list-card-content-item-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  image {
    width: 40rpx;
    height: 40rpx;
    margin-right: 20rpx;
  }
}
.contents {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30rpx;
}
.list-card-item {
  width: 85%;
  position: relative;
  border: 2rpx solid #cccccc;
  border-radius: 20rpx;
  margin: 10rpx 0;
  color: #999;
  // &:last-child {
  //   margin-bottom: 200rpx;
  // }
}
.list-card-btn {
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  width: 100%;
  // border-top: 1px solid #e5e5e5;
  padding: 20rpx 0 0;
  top: 20rpx;
  .edit,
  .complete {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 24rpx;
    image {
      width: 40rpx;
      margin-right: 20rpx;
    }
  }
  .complete {
    // border-left: 1px solid #e5e5e5;
  }
  .com_success {
    // color: $app-theme;
  }
  .timeout {
    // color: $uni-color-error;
  }
}
.text {
  width: 180rpx;
  color: #666;
}
.list-code {
  display: flex;
}
.work_con {
  width: 73%;
  text-align: justify;
}
.popup {
  background: #eee;
  padding: 20rpx 40rpx;
  border-radius: 20rpx;
  width: 70%;
  //  margin:20rpx auto;
  text-align: center;
  position: relative;
  top: 30%;
  left: 10%;
  transform: translate(-50% -50%);
  //  position: fixed;
  //  text-align: center;
  //  top:50%;
  //  transform: translateY(-50%);
}
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 888;
  background-color: rgba(0, 0, 0, 0.6);
}
.btn_wrap {
  display: flex;
}
.btn {
  height: 70rpx;
  width: 35%;
  line-height: 70rpx;
  font-size: 26rpx;
}
.cancel_btn {
  background: #ffffff;
  color: #000000;
}
.setLevel {
  justify-content: flex-end;
  .setLevel_btn {
    line-height: 35rpx;
    font-size: 22rpx;
    color: #0065fd;
    font-weight: normal;
  }
}
.nextImage {
  width: 35rpx;
  height: 35rpx;
}
</style>